transform: Coalesce similar transforms
authorBenjamin Otte <otte@redhat.com>
Sun, 2 Jun 2019 12:16:45 +0000 (14:16 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 2 Jun 2019 19:18:56 +0000 (21:18 +0200)
commit5a0c8805fc9d0477b00139ae63c3c696a1fc5d19
tree7e2ab745bbb8fd68b3f233ddf764bc2e004f0f9f
parent69629ebb1a3d33376aaa3bfcf6fcd385ffa6377b
transform: Coalesce similar transforms

If somebody does a transform like
  scale(5) scale(10) translate(1,1) translate(5,0)
store it instead as
  scale(50) translate(6,1)
This way, less memory is consumed and transforms are easier to read.

In particular, this simplifies the typical transforms we do in GTK,
which are just one translation after another.
gsk/gsktransform.c
testsuite/gsk/nodeparser/widgetfactory.node